html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}
#wrapper {
    position: relative;
    height: 100%;
    width: 400px; /* container width to be same as that of the target element*/
    margin: 0 auto; /* horizontal aligned center*/
}
#contentBody {
    position: absolute;
    top: 50%;
    width: 400px; /* width of target element */
    height: 300px; /* height of target element */
    margin-top: -150px; /* Important: HALF the height of target element */
}
